package common.model.po;

import com.baomidou.mybatisplus.annotation.TableName;
import common.model.enums.SysTopicIsClosedEnum;
import common.model.enums.SysTopicTypeEnum;
import common.model.po.base.BasePo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * 话题
 *
 * @author 米泽鹏
 * @since 2023-08-29 上午 01:02
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("sys_topic")
@ApiModel(value = "SysTopic对象", description = "话题")
public class SysTopic extends BasePo<SysTopic> {

	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = "用户id")
	private Long userId;

	@ApiModelProperty(value = "用户昵称")
	private String nickname;

	/**
	 * {@link SysTopicTypeEnum}
	 */
	@ApiModelProperty(value = "话题类型")
	private String type;

	@ApiModelProperty(value = "标题")
	private String title;

	@ApiModelProperty(value = "话题内容")
	private String content;

	/**
	 * {@link SysTopicIsClosedEnum}
	 */
	@ApiModelProperty(value = "话题是否已关闭")
	private String isClosed;

	@ApiModelProperty(value = "排序")
	private Integer sort;

	@Override
	public Serializable pkVal() {
		return super.getId();
	}

}
